package com.example.springbootthread.lifecycle;

/**
 * @author : guorf
 * @version : v1.0
 * @description : TODO 线程在Warting上等待
 * @createTime : 2022/7/21 15:06
 */
public class WaitingState implements Runnable {
    @Override
    public void run() {
        while (true) {
            synchronized (WaitingState.class) {
                try {
                    WaitingState.class.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
